﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TEngine;
using UnityEngine;

namespace GameLogic
{
    internal class UIGameWidget:UIWidget
    {
        protected bool m_IsOpen = true;
        public void Close()
        {
            var animator = gameObject.GetComponent<Animator>();
            if (animator)
                animator.Play("Close");
            m_IsOpen = false;
        }
        public void Open()
        {
            if(!gameObject.activeSelf)
                gameObject.SetActive(true);
            var animator = gameObject.GetComponent<Animator>();
            if (animator)
                animator.Play("Open");
            m_IsOpen = true;
        }
    }
}
